home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 020a / tiffrd.zip / READ.ME < prev    next >
Text File  |  1990-08-10  |  5KB  |  89 lines

  1.                          TiffRead Program Description
  2.                             Aldus Developers Desk
  3.                           Aldus Corporation 90-06-14
  4.  
  5.  
  6. The TiffRead program is intended to be used as an example of one approach to
  7. writing a TIFF reader. The program itself is useful as a diagnostic aid, but the
  8. primary goal was to satisfy requests for source code for a complete TIFF
  9. reader.
  10.  
  11. TiffRead opens a TIFF file, dumps the "header" (IFD) information, and then tries
  12. to read, decompress, and convert the first N scan lines to hex.  Black and
  13. white, grayscale, full color (24-bit), and palette color (4-bit and 8-bit)
  14. images are supported. LZW, PackBits, and CCITT 1D compression schemes are
  15. supported. (PackBits and CCITT 1D are allowed on black-and-white images only.
  16. LZW can be used with any image type.) Both 'II' and 'MM' byte orders are
  17. supported.
  18.  
  19. Your application will probably not use much if any of the code in TiffRead.c.
  20. TiffRead.c is simply a sample application that calls the TIFF reading
  21. routines, in particular, the GtIfdInfo, RdBCRow, and CloseImag routines.
  22. TiffRead.c is somewhat large and complicated because it has extra code to do a
  23. formatted dump of IFD information (probably not a useful feature for most
  24. applications) and because it has extra code to recursively handle the new
  25. proposed TIFF child image structures.
  26.  
  27. The actual TIFF reading code in TiffRead (i.e., everything except TiffRead.c,
  28. unix main.c, and the libraries) takes up about 10K bytes when compiled.
  29.  
  30. TiffRead is less forgiving than current Aldus applications about errors and
  31. not-recommended practices in TIFF files. In particular, it wants StripByteCounts
  32. to exist, and it doesn't like large strips, even for uncompressed files. Future
  33. Aldus products may be similarly restrictive. This makes memory management easier
  34. and more efficient for TIFF readers and editors, so, writers, please take note.
  35.  
  36. TiffRead also warns about a number of other potential problems in TIFF files. If
  37. your application triggers any such warnings, you should update your application
  38. as soon as is convenient in order to avoid future problems.
  39.  
  40. TiffRead does not display the image. If you have already written code to display
  41. MacPaint, PCX, or TGA files, for example, the same code will work for TIFF
  42. files.
  43.  
  44. If you haven't yet written any image display code, and if your application needs
  45. to display images, you have some work ahead of you. We are not, unfortunately,
  46. in a position to assist you in this task. Image display techniques tend to vary
  47. considerably depending on your operating environment (Windows, OS/2, Mac, UNIX
  48. workstation, etc), and also depend very much on the needs of your application.
  49. And we consider much of our own image display and manipulation code to be
  50. proprietary. Again, this has nothing to do with TIFF, so please don't grumble at
  51. the Aldus Developers Desk staff. We did not invent image file formats; we merely
  52. gave the world a non-proprietary and portable alternative to existing and
  53. proposed image file formats. You, the application developer, are responsible for
  54. image display, manipulation, and processing. We have supplied you with
  55. everything you need to read and decompress a TIFF file; what you do with the
  56. resulting generic pixels is up to you.
  57.  
  58. Fully supporting images, whatever the format (TIFF, PCX, TGA, etc.), requires a
  59. fair amount of effort. You should carefully consider whether it is worth it for
  60. your application. You may be better off just supporting PICT files, Windows
  61. Metafiles, EPS files, or some other display-only or print-only data type as your
  62. primary method of graphics import. These data types do not allow access at the
  63. pixel level, and are generally not portable, but that is not a problem for many
  64. applications.
  65.  
  66. This source code is certainly not the only way to structure a TIFF reader. It
  67. does not in any way represent the "official" way to read TIFF files. It is
  68. intended to be a hopefully instructive example, nothing more. The TIFF
  69. specification itself is intended to be the final authority on what TIFF files
  70. should look like.
  71.  
  72. We are not supplying "TIFF Writer" code at this time, because writing TIFF files
  73. is very easy compared to reading TIFF files, and because writing is even more
  74. application-dependent than reading. But note that LZW compression software (in
  75. lzwcm.c) is included on your disk, even though it is not called by the program.
  76.  
  77. TiffRead was written to be portable to multiple platforms. This version has been
  78. compiled and tested on both Macintosh (Think C 4.0) and DOS (Microsoft C)
  79. platforms to date. Although most of the code is completely portable, there are a
  80. few conditionally compiled sections, surrounded by #ifdef MACINTOSH or #ifdef
  81. WINDOWS. (#ifdef WINDOWS works fine for DOS without WINDOWS, too.) These
  82. sections usually just compensate for byte order differences. If you are not on
  83. either machine, you may have write your own little piece of code in these
  84. sections, although generally you will be able to use either the MACINTOSH case
  85. or the WINDOWS case.
  86.  
  87.  
  88. - Aldus Developers Desk
  89.